@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');


.music-container {
    /* 父元素即包裹class名为music-container标签的上一级元素要设置position:relative,即相对于父元素定位 */
    position: absolute;
    /* 形状大小 */
    transform: scale(0.9); 
    /* 定位 */
    top: 250px;
    left: 900px;

    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 0 20px 0 rgba(8, 182, 212, 0.822);
    display: flex;
    padding: 20px 30px;
    width: 400px;
    z-index: 10;
}

.music-title{
    position: absolute;
    top: -160px;
    left: 130px;
    font-size: 30px;
    letter-spacing: 10px;
    line-height: height;
    font-family: Microsoft YaHei;
    color: black;
}

.img-container {
    position: absolute;
    top: -140px;
    left: -130px;
    width: 250px;
    height: 250px;
}

.img-container::after {
    position: absolute;
    content: "";
    background-color: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    transform: translate(-50%);
}

.img-container img {
    border-radius: 50%;
    height: 250px;
    width: 250px;
    object-fit: cover;
    position: absolute;
    bottom: 0;
    left: 0;
    /* 封面360°旋转，默认不动 */
    animation: rotate 3s linear infinite;
    animation-play-state: paused;
}

.music-container.play .img-container img {
    /* 播放 */
    animation-play-state: running;
}

/* 定义旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

.navigation {
    margin-left: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.action-btn {
    /* 取消默认样式 */
    border: 0;
    background-color: #fff;
    /* ----- */
    color: #0decfc;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    margin: 0 20px;
}

.action-btn:focus {
    /* 取消默认样式 */
    outline: 0;
}

.action-btn.action-btn-big {
    color: #0cdae9;
    font-size: 30px;
}



.music-info {
    position: absolute;
    top: 0;
    left: 20px;
    /* 父元素宽度-40px */
    width: calc(100% - 100px);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 15px 15px 15px 0;
    padding: 10px 10px 10px 150px;
    transform: translateY(-100%);
    /* 没播放时默认隐藏
    opacity: 0;
    transform: translateY(0%);
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
    */
    z-index: 0;
}

.music-info h4 {
    /* 取消默认边距 */
    margin: 0;
    font-size: 24px;
}

.music-container.play .music-info {
    opacity: 1;
    /*transform: translateY(-100%);*/
}


.progress-container {
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
    height: 4px;
    width: 100%;
}

.progress {
    background-color: #0decfc;
    border-radius: 5px;
    height: 100%;
    /* 一开始进度条长度为0 */
    width: 0%;
    transition: width 0.1s linear;

}